package cn.bonoon.entities.interacting;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

/**
 * 常见问题
 * @author jackson
 *
 */
@Entity
@Table(name = "t_faq")
public class FaqEntity extends AbstractQuestionEntity {

	private static final long serialVersionUID = -155175573654488865L;

	/**
	 * 对应子系统的 key。系统，所有人可以看：null
	 * 将不再使用
	 */
	@Deprecated
	@Column(name = "C_KEY")
	private String key;

	@ManyToOne
	@JoinColumn(name = "R_CATALOG_ID")
	private FaqCatalogEntity catalog;
	
	/**
	 * 1：公开，在前台显示的时候，没有登录也可以看到
	 * 2：会员，需要登录前台的会员系统可以看到
	 * 其它值就只有登录后台才可以看到
	 */
	@Column(name = "C_LEVEL")
	private int level;

	/** 可以调整常见问题排列的顺序 */
	@Column(name = "C_ORDINAL")
	private int ordinal;

	@Column(name = "C_DISABLE")
	private boolean disable;

	public String getKey() {
		return key;
	}

	public void setKey(String key) {
		this.key = key;
	}

	public int getLevel() {
		return level;
	}

	public void setLevel(int level) {
		this.level = level;
	}

	public FaqCatalogEntity getCatalog() {
		return catalog;
	}

	public void setCatalog(FaqCatalogEntity catalog) {
		this.catalog = catalog;
	}

	public int getOrdinal() {
		return ordinal;
	}

	public void setOrdinal(int ordinal) {
		this.ordinal = ordinal;
	}

	public boolean isDisable() {
		return disable;
	}

	public void setDisable(boolean disable) {
		this.disable = disable;
	}
	
	
}
